*/ This file contains commands for replication of analysis presented in "Party
Systems and Political Centralization and Decentralization" - Ken Kollman and 
Alton B.H. Worthington, for the Journal of Politics.

THIS VERSION: 18 December 2019

Code contained herein replicates only the results, not creation of publication
tables or other visuals presented in the manuscript. Additional results
presented in the online appendix are contained in a separate "Appendix" do file
which uses the same dataset as this do file. 

For additional assistance or questions, please contact Alton B.H. Worthington
(abhw@umich.edu).

This code was tested and run in Stata 15.0, 15.1, and 16. Compatibility with
other versions is the responsibility of the user. */

set more off

use "KollmanWorthingtonPartySystems.dta", clear

** Replication of Table 1: Summary Statistics

summarize n_RAI inflation1 PSNS_sw inflation4RS

** Replication of Models for Figures 1a - 1c (standardized for presentation)

sem (L_n_RAI -> n_RAI, ) (L_n_RAI -> inflation1, ) ///
	(L_inflation1 -> n_RAI, ) (L_inflation1 -> inflation1, ) ///
	(tier1_avemag -> inflation1, ) (separationbin -> n_RAI, ) ///
	(separationbin -> inflation1, ) (majoritarianbg -> n_RAI, ) ///
	(majoritarianbg -> inflation1, ) (agedem -> n_RAI, ) ///
	(agedem -> inflation1, ) (post91 -> n_RAI, ) (LA -> n_RAI, ) ///
	(EUmem -> n_RAI, ) (NATOmem -> n_RAI, ), vce(robust) ///
	cov( L_n_RAI*L_inflation1 e.n_RAI*e.inflation1) nocapslatent standardized

sem (L_n_RAI -> n_RAI, ) (L_n_RAI -> PSNS_sw, ) ///
	(L_PSNS_sw -> n_RAI, ) (L_PSNS_sw -> PSNS_sw, ) ///
	(tier1_avemag -> PSNS_sw, ) (separationbin -> n_RAI, ) ///
	(separationbin -> PSNS_sw, ) (majoritarianbg -> n_RAI, ) ///
	(majoritarianbg -> PSNS_sw, ) (agedem -> n_RAI, ) ///
	(agedem -> PSNS_sw, ) (post91 -> n_RAI, ) (LA -> n_RAI, ) ///
	(EUmem -> n_RAI, ) (NATOmem -> n_RAI, ), vce(robust) ///
	cov( L_n_RAI*L_PSNS_sw e.n_RAI*e.PSNS_sw) nocapslatent standardized

sem (L_n_RAI -> n_RAI, ) (L_n_RAI -> inflation4RS, ) ///
	(L_inflation4RS -> n_RAI, ) (L_inflation4RS -> inflation4RS, ) ///
	(tier1_avemag -> inflation4RS, ) (separationbin -> n_RAI, ) ///
	(separationbin -> inflation4RS, ) (majoritarianbg -> n_RAI, ) ///
	(majoritarianbg -> inflation4RS, ) (agedem -> n_RAI, ) ///
	(agedem -> inflation4RS, ) (post91 -> n_RAI, ) (LA -> n_RAI, ) ///
	(EUmem -> n_RAI, ) (NATOmem -> n_RAI, ), vce(robust) ///
	cov( L_n_RAI*L_inflation4RS e.n_RAI*e.inflation4RS) nocapslatent standardized

** Replication of Table 2: Correlation of Indices with RAI

correlate n_RAI admin fiscal political

** Replication of Models for Figures 2a - 2c (standardized for presentation)

sem (L_fiscal -> fiscal, ) (L_fiscal -> inflation1, ) ///
	(L_inflation1 -> fiscal, ) (L_inflation1 -> inflation1, ) ///
	(tier1_avemag -> inflation1, ) (separationbin -> fiscal, ) ///
	(separationbin -> inflation1, ) (majoritarianbg -> fiscal, ) ///
	(majoritarianbg -> inflation1, ) (agedem -> fiscal, ) ///
	(agedem -> inflation1, ) (post91 -> fiscal, ) (LA -> fiscal, ) ///
	(EUmem -> fiscal, ) (NATOmem -> fiscal, ), vce(robust) ///
	cov( L_fiscal*L_inflation1 e.fiscal*e.inflation1) nocapslatent standardized

sem (L_fiscal -> fiscal, ) (L_fiscal -> PSNS_sw, ) ///
	(L_PSNS_sw -> fiscal, ) (L_PSNS_sw -> PSNS_sw, ) ///
	(tier1_avemag -> PSNS_sw, ) (separationbin -> fiscal, ) ///
	(separationbin -> PSNS_sw, ) (majoritarianbg -> fiscal, ) ///
	(majoritarianbg -> PSNS_sw, ) (agedem -> fiscal, ) ///
	(agedem -> PSNS_sw, ) (post91 -> fiscal, ) (LA -> fiscal, ) ///
	(EUmem -> fiscal, ) (NATOmem -> fiscal, ), vce(robust) ///
	cov( L_fiscal*L_PSNS_sw e.fiscal*e.PSNS_sw) nocapslatent standardized

sem (L_fiscal -> fiscal, ) (L_fiscal -> inflation4RS, ) ///
	(L_inflation4RS -> fiscal, ) (L_inflation4RS -> inflation4RS, ) ///
	(tier1_avemag -> inflation4RS, ) (separationbin -> fiscal, ) ///
	(separationbin -> inflation4RS, ) (majoritarianbg -> fiscal, ) ///
	(majoritarianbg -> inflation4RS, ) (agedem -> fiscal, ) ///
	(agedem -> inflation4RS, ) (post91 -> fiscal, ) (LA -> fiscal, ) ///
	(EUmem -> fiscal, ) (NATOmem -> fiscal, ), vce(robust) ///
	cov( L_fiscal*L_inflation4RS e.fiscal*e.inflation4RS) nocapslatent standardized

** Replication of Models for Figures 3a - 3c (standardized for presentation)
sem (L_admin -> admin, ) (L_admin -> inflation1, ) ///
	(L_inflation1 -> admin, ) (L_inflation1 -> inflation1, ) ///
	(tier1_avemag -> inflation1, ) (separationbin -> admin, ) ///
	(separationbin -> inflation1, ) (majoritarianbg -> admin, ) ///
	(majoritarianbg -> inflation1, ) (agedem -> admin, ) ///
	(agedem -> inflation1, ) (post91 -> admin, ) (LA -> admin, ) ///
	(EUmem -> admin, ) (NATOmem -> admin, ), vce(robust) ///
	cov( L_admin*L_inflation1 e.admin*e.inflation1) nocapslatent standardized

sem (L_admin -> admin, ) (L_admin -> PSNS_sw, ) ///
	(L_PSNS_sw -> admin, ) (L_PSNS_sw -> PSNS_sw, ) ///
	(tier1_avemag -> PSNS_sw, ) (separationbin -> admin, ) ///
	(separationbin -> PSNS_sw, ) (majoritarianbg -> admin, ) ///
	(majoritarianbg -> PSNS_sw, ) (agedem -> admin, ) ///
	(agedem -> PSNS_sw, ) (post91 -> admin, ) (LA -> admin, ) ///
	(EUmem -> admin, ) (NATOmem -> admin, ), vce(robust) ///
	cov( L_admin*L_PSNS_sw e.admin*e.PSNS_sw) nocapslatent standardized

sem (L_admin -> admin, ) (L_admin -> inflation4RS, ) ///
	(L_inflation4RS -> admin, ) (L_inflation4RS -> inflation4RS, ) ///
	(tier1_avemag -> inflation4RS, ) (separationbin -> admin, ) ///
	(separationbin -> inflation4RS, ) (majoritarianbg -> admin, ) ///
	(majoritarianbg -> inflation4RS, ) (agedem -> admin, ) ///
	(agedem -> inflation4RS, ) (post91 -> admin, ) (LA -> admin, ) ///
	(EUmem -> admin, ) (NATOmem -> admin, ), vce(robust) ///
	cov( L_admin*L_inflation4RS e.admin*e.inflation4RS) nocapslatent standardized

** Replication of Models for Figures 4a - 4c (standardized for presentation)
sem (L_political -> political, ) (L_political -> inflation1, ) ///
	(L_inflation1 -> political, ) (L_inflation1 -> inflation1, ) ///
	(tier1_avemag -> inflation1, ) (separationbin -> political, ) ///
	(separationbin -> inflation1, ) (majoritarianbg -> political, ) ///
	(majoritarianbg -> inflation1, ) (agedem -> political, ) ///
	(agedem -> inflation1, ) (post91 -> political, ) (LA -> political, ) ///
	(EUmem -> political, ) (NATOmem -> political, ), vce(robust) ///
	cov( L_political*L_inflation1 e.political*e.inflation1) nocapslatent standardized

sem (L_political -> political, ) (L_political -> PSNS_sw, ) ///
	(L_PSNS_sw -> political, ) (L_PSNS_sw -> PSNS_sw, ) ///
	(tier1_avemag -> PSNS_sw, ) (separationbin -> political, ) ///
	(separationbin -> PSNS_sw, ) (majoritarianbg -> political, ) ///
	(majoritarianbg -> PSNS_sw, ) (agedem -> political, ) ///
	(agedem -> PSNS_sw, ) (post91 -> political, ) (LA -> political, ) ///
	(EUmem -> political, ) (NATOmem -> political, ), vce(robust) ///
	cov( L_political*L_PSNS_sw e.political*e.PSNS_sw) nocapslatent standardized

sem (L_political -> political, ) (L_political -> inflation4RS, ) ///
	(L_inflation4RS -> political, ) (L_inflation4RS -> inflation4RS, ) ///
	(tier1_avemag -> inflation4RS, ) (separationbin -> political, ) ///
	(separationbin -> inflation4RS, ) (majoritarianbg -> political, ) ///
	(majoritarianbg -> inflation4RS, ) (agedem -> political, ) ///
	(agedem -> inflation4RS, ) (post91 -> political, ) (LA -> political, ) ///
	(EUmem -> political, ) (NATOmem -> political, ), vce(robust) ///
	cov( L_political*L_inflation4RS e.political*e.inflation4RS) nocapslatent standardized
